# Contributor: Luca Weiss <luca@z3ntu.xyz>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=ncpamixer
pkgver=1.3.7
pkgrel=0
pkgdesc="ncurses PulseAudio Mixer"
url="https://github.com/fulhax/ncpamixer"
arch="all"
license="MIT"
makedepends="cmake pulseaudio-dev ncurses-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/fulhax/ncpamixer/archive/$pkgver.tar.gz"
options="!check" # no tests

build() {
	# src/ui/tab.cpp accesses struct tagITEM which has been made opaque
	export CXXFLAGS="$CXXFLAGS -DNCURSES_INTERNALS"

	cmake "$builddir"/src \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr
	make
}

package() {
	DESTDIR="$pkgdir" make install
}

sha512sums="
2712a6a490519d2d145cd524efbbf69bb54e4e9a54b032bdf24ff50bf1e3d2737b65f5f953e0469fa927e6a26009637a0e815c01c975508c28aa59fa7e39545c  ncpamixer-1.3.7.tar.gz
"
